<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .radius {
      height: 100px;
      display: flex;
      justify-content: flex-start;
    }

    .radius::before,
    .radius::after {
      content: "";
      width: 20px;
      background: #098fae;
    }

    .radius::before {
      border-radius: 20px 0 0 20px;
    }

    .content {
      background: #098fae;
      width: 1px;
      transform: scale3d(1, 1, 1);
      transform-origin: left;
    }

    .radius::after {
      border-radius: 0 20px 20px 0;
      transform: translate3d(0, 0, 0);
    }

    /* CSS Animation */
    /* 不太理解这个方案 这个就是一个语法解决规则，可以自定义一些样式表的内容 */
    @property --width {
      initial-value: 1px;
      inherits: false;
      syntax: "<length>";
    }

    @keyframes square {
      to {
          --width: 300px;
      }
    }

    .content {
      width: var(--width);
      animation: square 2s ease infinite alternate;
    }

  </style>
</head>
<body>
  <div class="radius">
    <div class="content"></div>
  </div>
</body>
</html>